<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>父子组件通信</title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>
<div id="app">
    <son :message="msg"></son>
</div>
<script>
    Vue.component('son', {
        props:['message'],
        template: `<div>{{message}}</div>`
    });

    let vm = new Vue({
        el: "#app",
        data: {
            msg: "我是父组件里的数据",
        }
    });
</script>
</body>
</html>